package com.example.service;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.example.dao.OrderRepository;
import com.example.entity.Order;

@Service
public class OrderService {
	@Resource
	private OrderRepository orderRepository;

	@Transactional
	public Order createOrder(Integer orderId, Integer memberId, Integer goodsId, Integer points, Integer quantity) {
		return orderRepository.save(new Order(orderId, memberId, goodsId, points, quantity));
	}
}